<template>
  <div class="fix_top">
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          style="text-align:center;"
        >
        <template>
          <router-link to="/submit/article">
            <el-menu-item index="1">
              <i class="iconfont icon-fabu"></i>
              <span slot="title">投稿</span>
            </el-menu-item>
          </router-link>
        </template>
          <el-submenu index="2">
            <template slot="title">
              <i class="iconfont icon-fabuguanli"></i>
              <span>内容管理</span>
            </template>
            <router-link to="/submit/manuscript">
              <el-menu-item index="2-1">稿件管理</el-menu-item>
            </router-link>
          </el-submenu>

        </el-menu>
      </el-aside>
      <el-main style="padding:0 20px;">
        <router-view />
      </el-main>
    </el-container>
  </div>
</template>
<script>
export default {
  name: 'Tabbar',
  data () {
    return {}
  },
  created(){
    this.$router.push("/submit/article")
  },
  methods: {
    handleOpen (key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
<style scoped></style>
